<%@ include file="../header.jsp" %>
<%@ page import="admin.system.rolefunc.*" %>
<%@ page import="admin.options.*" %>

<script language=javascript>
 function formValidation() {
    var d1 = fm.role_id;
    var d2 = fm.func_id;
    if (isNull(d1,"Role ID")||isNull(d2,"Function ID"))  {
       return false;
    }
    return true;
 }
<%
    RoleFuncBean roleFunc = (RoleFuncBean)request.getAttribute("roleFunc");
    if (roleFunc==null)
       roleFunc = new RoleFunc();
    RoleOptions ro = new RoleOptions();
    FuncOptions fo = new FuncOptions();
%>
</script>
<body>
<h2>Role - Function Maintenance</h2>
<form id=fm method=post action=<%=contextPath%>/servlet/admin.system.rolefunc.RoleFuncServlet >
<input type=hidden name=formAction value=<%=formAction%> >
<table cols=2 border=0 >
<tr>
  <td>Role ID</td>
  <td>
  <select name=role_id >
          <%=ro.getOptions(roleFunc.getRole_id(),formAction.trim().equalsIgnoreCase("Update"))%>
  </select>
  </td>
</tr>
<tr>
  <td>Function ID</td>
  <td>
  <select name=func_id >
          <%=fo.getOptions(roleFunc.getFunc_id(),formAction.trim().equalsIgnoreCase("Update"))%>
  </select>
  </td>
</tr>
<tr>
  <td>Remark</td>
  <td><input type=text name=remark value="<%=roleFunc.getRemark()%>" maxlength=100></td>
</tr>
</table>
<hr>
<p>
  <INPUT type=button value=Save onclick="save()" >
  <INPUT type=button value=Delete  onclick="deleteRecord()"  >
  <INPUT type=reset  value=Cancel >
</p>
</form>
<%@ include file="../footer.jsp" %>
</body>
</body>
</html>

